function vip(tbl){
	if(user()==null){
		return ">>:login?goto=pay/zb/"+tbl.id
	}
	if(isEmpty(tbl.id)){
		return ">>:pay/orders/id/1";
	}
	var vip=$fetch("vip",Cnd.where("id","=",tbl.id))
	if(vip.price>0){
	var o=$fetch("orders",Cnd.where("tbl_id","=",tbl.id).and("tbl_name","=","vip").and("user_id","=",user().id));
	if(o!=null){
		if(o.status==1){
			attr("order",o)
			return ">>:pay/applysuccess"
		}else{
			attr("order",o)
			return ">>:pay/order/id/"+o.id;
		}
	}
	var order=new Record();
	order.put(".table","orders")
	var oid=uuid();
	order.put("id",oid);
	var OrderNo=Java.type("com.jse.util.OrderNo");
	order.put("tbl_name","zb");
	order.put("tbl_id",tbl.id);
	order.put("title",vip.title);
	order.put("img",vip.img);
	order.put("agency_id",1);
	if(!isEmpty(tbl.uid)){
		order.put("uid",tbl.uid);
		var u=dao.fetch("users",Cnd.where("id","=",tbl.uid))
		order.put("organ_id",u.organ_id);
		}
	var no=OrderNo.getOrderNo();
	order.put("orderno", no);
	order.put("user_id",user().id);
	order.put("price",vip.price); 
	order.put("total_price",vip.price)
	order.put("content",vip.text)
	order.put("text",vip.text)
	order.put("add_time",new java.util.Date())
	$save(order);
	attr("order",order)
		return ">>:pay/order/id/"+oid;
	}else{
		return ">>:vip/"+tbl.id;
	}
}